<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js">
    </script>
</head>

<body>
    <script>
        var app = angular.module('myApp', []);
        app.controller('myCtrl', function ($scope) {
            // 设置初始值,页面加载时会进来
            $scope.name = "John Doe";
        });
    </script>
    <div ng-app="myApp" ng-controller="myCtrl">
        名字:<input ng-model="name">
        <h1>输入:{{name}}</h1>
    </div>
</body>

</html>